import { UserAuth } from "../../utils/hooks"
import NotAuth from "../../components/NotAuth"
import { Layout, Menu, Breadcrumb } from 'antd';
import UserSheet from "../../components/UserSheet"
import { useEffect } from 'react';
const { Header, Content, Footer } = Layout;


const UserManager = () => {
  return (
    <Layout className="layout">
      <Header style={{ borderRadius: "5px 5px 0px 0px", height: "40px", padding: "0px 15px", margin: "0px 0px", backgroundColor: 'white', textAlign: "left", lineHeight: "40px" }}>
        <h3>用户管理</h3>
      </Header>
      <Content style={{ padding: '10px 0px', backgroundColor: "white" }}>
        <div className="site-layout-content">
        <UserSheet></UserSheet>
        </div>
      </Content>
    </Layout>
  )
}

export default () => {
  const { authority } = UserAuth("UserManager");
  return (
    <>
      {
        authority ? (<UserManager ></UserManager>) : (<NotAuth />)
      }
    </>
  )
}